<%@ Page Title="Message Details" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" 
	Inherits="System.Web.Mvc.ViewPage<gnodotnet.Core.MailingList.Message>" %>
<%@ Import Namespace="gnodotnet.Web.Controllers.MailingList" %>
<%@ Import Namespace="gnodotnet.Web.Controllers" %>

<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">

    <h1>Message Details</h1>

    <ul>
		<li>
			<label for="Message_Subject">Subject:</label>
            <span id="Message_Subject"><%= Server.HtmlEncode(ViewData.Model.Subject.ToString()) %></span>
		</li>
		<li>
			<label for="Message_Contents">Contents:</label>
            <span id="Message_Contents"><%= Server.HtmlEncode(ViewData.Model.Contents.ToString()) %></span>
		</li>
		<li>
			<label for="Message_SentOn">SentOn:</label>
            <span id="Message_SentOn"><%= Server.HtmlEncode(ViewData.Model.SentOn.ToString()) %></span>
		</li>
	    <li class="buttons">
            <%= Html.Button("btnSend", "Send", HtmlButtonType.Button, 
                "window.location.href = '" + Html.BuildUrlFromExpression<MessagesController>(c => c.Send(ViewData.Model.Id)) + "';") %>
            <%= Html.Button("btnBack", "Back", HtmlButtonType.Button, 
                "window.location.href = '" + Html.BuildUrlFromExpression<MessagesController>(c => c.Index()) + "';") %>
        </li>
	</ul>

</asp:Content>
